<script>
  Alchemy.routes = {

    admin_picture_path: function(id) {
      return '<%= alchemy.admin_picture_path(id: 1) %>'.replace(/1/, id);
    },

    url_admin_picture_path: function(id) {
      return '<%= alchemy.url_admin_picture_path(id: 1) %>'.replace(/1/, id);
    },

    collapse_admin_element_path: function(id) {
      return '<%= alchemy.collapse_admin_element_path(id: 1) %>'.replace(/1/, id);
    },

    expand_admin_element_path: function(id) {
      return '<%= alchemy.expand_admin_element_path(id: 1) %>'.replace(/1/, id);
    },

    publish_admin_element_path: function(id) {
      return '<%= alchemy.publish_admin_element_path(id: 1) %>'.replace(/1/, id);
    },

    node: {
      toggle_folded_api_path: function(id) {
        return '<%= alchemy.toggle_folded_api_node_path(id: 1) %>'.replace(/1/, id);
      },

      move_api_path: function(id) {
        return '<%= alchemy.move_api_node_path(id: 1) %>'.replace(/1/, id);
      },
    },

    move_admin_page_path: function(id) {
      return '<%= alchemy.move_api_page_path(id: 1) %>'.replace(/1/, id);
    },

    fold_admin_page_path: function(id) {
      return '<%= alchemy.fold_admin_page_path(id: 1) %>'.replace(/1/, id);
    },

    order_admin_elements_path: '<%= alchemy.order_admin_elements_path %>',
    link_admin_pages_path: '<%= alchemy.link_admin_pages_path %>',
    api_pages_path: '<%= alchemy.api_pages_path %>',
    api_elements_path: '<%= alchemy.api_elements_path %>',
    api_ingredients_path: '<%= alchemy.api_ingredients_path %>'
  };
</script>
